﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace dpdw.Structure.FaçadePattern
{
    public class HomeTheaterFacade
    {
        Amplifier amp;
        Tuner tuner;
        DvdPlayer dvd;
        CdPlayer cd;
        Projector projector;
        TheaterLights lights;
        Screen screen;

        public HomeTheaterFacade(Amplifier amp,
            Tuner tuner,
            DvdPlayer dvd,
            CdPlayer cd,
            Projector projector,
            TheaterLights lights,
            Screen screen)
        {
            this.amp = amp;
            this.tuner = tuner;
            this.dvd = dvd;
            this.cd = cd;
            this.projector = projector;
            this.lights = lights;
            this.screen = screen;
        }

        public void WatchMovie()
        {
            this.projector.On();
            this.lights.On();
            this.screen.Down();

            this.dvd.On();
            this.dvd.Play();
        }

        public void EndMovie()
        {
            this.dvd.Off();
            this.projector.Off();
            this.lights.Off();
            this.screen.Up();
        }

        public void ListenToCD()
        {

        }

        public void EndCD()
        {

        }

        public void ListenToRadio()
        {
            this.tuner.On();
            this.tuner.SetFM();
            this.tuner.SetFrequnency();
        }

        public void EndRadio()
        {
            this.tuner.Off();
        }
    }
}
